﻿// Copyright (c)  YISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

using NSQL.Expressions.Functions;

namespace NSQL.Expressions
{
    public interface IExpressionVisitor<out T> : IFunctionVisitor<T>
    {
        T Visit(IComparisonExpression expression);

        T Visit(IColumnExpression expression);

        T Visit(IConstantExpression expression);

        T Visit(IInExpression expression);

        T Visit(INotInExpression expression);

        T Visit(ILogicalExpression expression);

        T Visit(IBetweenExpression expression);

        T Visit(INotExpression expression);

        T Visit(INullExpression expression);

        T Visit(INotNullExpression expression);

        T Visit(IMatchExpression expression);
        T Visit(ISimpleMatchExpression expression);

        T Visit(IArithmeticExpression expression);

        T Visit(IUnaryExpression expression);

        T Visit(ISystemVariable expression);


        T Visit(ILikeExpression expression);


        T Visit(IExpressions expression);

        T Visit(IExistsExpression expression);

        IFunctionVisitor<T> FunctionVisitor { get; }
    }
    
    public interface IExpressionVisitor : IFunctionVisitor
    {
        void Visit(IComparisonExpression expression);

        void Visit(IColumnExpression expression);

        void Visit(IConstantExpression expression);

        void Visit(IInExpression expression);

        void Visit(INotInExpression expression);

        void Visit(ILogicalExpression expression);

        void Visit(IBetweenExpression expression);

        void Visit(INotExpression expression);

        void Visit(INullExpression expression);

        void Visit(INotNullExpression expression);

        void Visit(IMatchExpression expression);
        void Visit(ISimpleMatchExpression expression);

        void Visit(IArithmeticExpression expression);

        void Visit(IUnaryExpression expression);

        void Visit(ISystemVariable expression);


        void Visit(ILikeExpression expression);


        void Visit(IExpressions expression);

        void Visit(IExistsExpression expression);

        IFunctionVisitor FunctionVisitor { get; }
    }
}